//
//  KRHttpTool.h
//  cookBook
//
//  Created by kuroken on 16/1/10.
//  Copyright © 2016年 kuroken. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface KRHttpTool : NSObject

+ (NSURLSessionDataTask *)get:(NSString *)url
                       params:(NSDictionary *)params
                      success:(void (^)(NSURLSessionDataTask *task, id json))success
                      failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;


+ (NSURLSessionDataTask *)post:(NSString *)url
                        params:(NSDictionary *)params
                       success:(void (^)(NSURLSessionDataTask *task, id json))success
                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;


@end
